import request from '@/utils/request'

// 查询成绩列表
export function listGrade(query) {
  return request({
    url: '/zua/grade/list',
    method: 'get',
    params: query
  })
}
// 查询成绩列表
export function listGradeStudent(query) {
  return request({
    url: '/zua/grade/listStudent',
    method: 'get',
    params: query
  })
}
// 根据当前登录人查询成绩信息
export function listGradeByLoginId(query) {
  return request({
    url: '/zua/grade/listGradeByLoginId',
    method: 'get',
    params: query
  })
}

// 查询成绩详细
export function getGrade(gradeId) {
  return request({
    url: '/zua/grade/' + gradeId,
    method: 'get'
  })
}

// 新增成绩
export function addGrade(data) {
  return request({
    url: '/zua/grade',
    method: 'post',
    data: data
  })
}

// 修改成绩
export function updateGrade(data) {
  return request({
    url: '/zua/grade',
    method: 'put',
    data: data
  })
}

// 删除成绩
export function delGrade(gradeId) {
  return request({
    url: '/zua/grade/' + gradeId,
    method: 'delete'
  })
}

// 导出成绩
export function exportGrade(query) {
  return request({
    url: '/zua/grade/export',
    method: 'get',
    params: query
  })
}
